{include file="public/layout" /}
<body class="bodystyle" style="cursor: default; -moz-user-select: inherit; min-width:400px;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page" style="min-width: 400px;">
    {foreach name="attr_list" item="vo" key="k" }
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>{$vo.attr_name}</strong></div>
        <div style="width: 90%;">{$vo.attr_value}</div>
    </div>
    {/foreach}
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>所属表单</strong></div>
        <div style="width: 90%;">{$row.form_name|default=''}</div>
    </div>
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>IP来源</strong></div>
        <div style="width: 90%;">{$row.ip}&nbsp;&nbsp;(<span id="city_name" data-ip="{$row.ip}"></span>)</div>
    </div>
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>提交来源</strong></div>
        <div style="width: 90%;">
            {if condition="$row['source'] == 2"}
                手机端
            {else /}
                电脑端
            {/if}
        </div>
    </div>
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>提交时间</strong></div>
        <div style="width: 90%;">{$row.add_time|MyDate='Y-m-d H:i:s',###}</div>
    </div>
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>查看时间</strong></div>
        <div style="width: 90%;">{$row.update_time|MyDate='Y-m-d H:i:s',###}</div>
    </div>
</div>
{notempty name='$row.reply'}
<div class="page mt10 mb20">
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>回复时间</strong></div>
        <div style="width: 90%;">{$row.reply_time|MyDate='Y-m-d H:i:s',###}</div>
    </div>
    <div style="display: flex;align-items: center;padding: 15px 0;">
        <div style="width: 10%;min-width: 60px;"><strong>回复内容</strong></div>
        <div style="width: 90%;">{$row.reply}</div>
    </div>
</div>
{/notempty}

<script type="text/javascript">
    $(function(){
        get_ip_city_name();
        function get_ip_city_name()
        {
            var ip = $('#city_name').data('ip');
            $('#city_name').html('查询区域中……');
            $.ajax({
                type : 'post',
                url : "{:url('Ajax/get_ip_city_name')}",
                data : {ip:ip, _ajax:1},
                dataType : 'json',
                success : function(res){
                    if (res.code == 1) {
                        $('#city_name').html(res.data.city_name);
                    } else {
                        $('#city_name').html('<a href="https://www.baidu.com/s?wd='+ip+'" target="_blank">查看地区</a>');
                    }
                },
                error:function(e){
                    $('#city_name').html(e.responseText);
                }
            });
        }
    });
</script>

{include file="public/footer" /}